package com.chinaums.fsp.sdk.request;

import org.xiajinsuo.avro.specific.SpecificRecordBase;

import com.chinaums.fsp.base.pgt.TransType;
import com.chinaums.fsp.sdk.base.RequestData;
import com.chinaums.fsp.sdk.base.ResponseDataWrapper;
import com.chinaums.fsp.sdk.pgt.params.DraftDealCloseRequest; 
/**
 * 汇票订单关闭：关闭未支付的汇票订单
 * @author hhh
 */
public class DraftDealCloseTest extends BaseRequest{

	/* 测试汇票订单关闭1 */
	public void testDraftDealClose1() throws Exception {
		
		PgtRequestFactory rf = FACTORY.factory();
		
		RequestData.Builder builder = this.createRequestDataBuilder();
		builder.setTransType(TransType.TRANSACTION_CLOSE.getTransCode());
		
		DraftDealCloseRequest data = DraftDealCloseRequest.newBuilder()
															.setOrigServerTransId("1101012017051511315107297808")
															.build()
															;
		rf.transType(TransType.TRANSACTION_CLOSE.getTransCode())
		.responseClass(SpecificRecordBase.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
	
		this.print(rdw);
	}
	/* 测试汇票订单关闭2 */
	public void testDraftDealClose2() throws Exception {
		
		PgtRequestFactory rf = FACTORY.factory();
		
		RequestData.Builder builder = this.createRequestDataBuilder();
		builder.setTransType(TransType.TRANSACTION_CLOSE.getTransCode());
		
		DraftDealCloseRequest data = DraftDealCloseRequest.newBuilder()
															.setOrigClientTransId("20170515113151906310")
															.build()
															;
		rf.transType(TransType.TRANSACTION_CLOSE.getTransCode())
		.responseClass(SpecificRecordBase.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
		
		this.print(rdw);
	}
	
	
}